/**
 * @description 处理成功或者错误信息模板
 */
class SuccessModel {
  constructor(data) {
    this.errno = 0;
    if (data) {
      this.data = data;
    }
  }
}

class ErrorModel {
  constructor(errno = -1, message = "error") {
    this.errno = errno;
    this.message = message;
  }
}

module.exports = {
  SuccessModel,
  ErrorModel,
};
